//首页顶部导航栏封装
//本页为了方便，不再使用高阶组件包装，我就直接用函数组件来写了
import { Flex } from "antd-mobile-v2"
import { useNavigate} from 'react-router-dom'
import "./index2.scss"
export default function Searchnavbar(props){
    const navigate = useNavigate()
    return(
            
            <Flex className={["homesearchnav",props.newclassName||""].join(" ")}>
            <Flex className="nav-left">
                <div className="location" onClick={()=>{navigate("/houselist")}}>
                    <span>{props.cityname}</span>
                    <i className="iconfont icon-arrow"></i>
                </div>

                <div onClick={()=>{navigate("/home/search")}}>
                    <i className="iconfont icon-seach"></i>
                    请输入小区或地址
                </div>
            </Flex>

            <div className="nav-right" onClick={()=>{navigate("/map")}}>
                <i className="iconfont icon-map"></i>
            </div>

            </Flex>


    )


}